package com.lsu.app.bean;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import javax.validation.constraints.NotNull;

import java.io.Serializable;

import java.util.Date;

import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModelProperty;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import lombok.Data;

/**
 * 学习记录
 * @Date 2023-11-11 20:31:13
 * @author hjj
 */
@Data
@TableName("study_log")
@ApiModel(value="StudyLog对象", description="学习记录")
public class StudyLog implements Serializable {

    @NotNull(message="[]不能为空")
    @ApiModelProperty("")
    private Integer id;

    @NotNull(message="[用户id]不能为空")
    @ApiModelProperty("用户id")
    private Integer userId;

    @NotNull(message="[课程id]不能为空")
    @ApiModelProperty("课程id")
    private Integer courseId;

    @TableField(exist = false) //该字段不存在于数据库中
    @ApiModelProperty("#课程")
    private Course course;

    @ApiModelProperty("学习时间（毫秒）")
    private String studyTime;

    @ApiModelProperty("创建时间")
    private String createTime;

    @ApiModelProperty("结束时间")
    private String endTime;

    @ApiModelProperty("当前集数")
    private Integer curEpisodes;

    @ApiModelProperty("是否完整记录(0不完整，1完整)")
    private Integer state;

    public StudyLog() {
    }

    public StudyLog(Integer userId, String studyTime,Integer courseId, String createTime, Integer curEpisodes) {
        this.userId = userId;
        this.studyTime=studyTime;
        this.courseId = courseId;
        this.createTime = createTime;
        this.curEpisodes = curEpisodes;
    }
}
